package com.myjoje.bean.system;


import com.myjoje.base.BaseUuidBean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 用户信息，账号和用户表示一对一关系
 */
@Entity
@Table(name = "sy_user")
public class UserBean extends BaseUuidBean {
    //用户状态：正常
    public static final String STATUS_NORMAL = "1";
    //用户状态：删除
    public static final String STATUS_DELETE = "2";

    //微信登录使用
    @Column(columnDefinition = "varchar(40) COMMENT '微信openid'")
    private String openid;

    //用户名登录
    @Column(columnDefinition = "varchar(40) COMMENT '用户名'")
    private String username;

    //手机号登录
    @Column(columnDefinition = "varchar(40) COMMENT '电话号码'")
    private String phoneNum;

    @Column(columnDefinition = "varchar(40) COMMENT '密码'")
    private String password;

    @Column(columnDefinition = "text COMMENT '角色编码，以英文逗号分隔'")
    private String roleIds;

    @Column(columnDefinition = "text COMMENT '权限编码，以英文逗号分隔'")
    private String permissionIds;

    @Column(columnDefinition = "text COMMENT '部门ids, 以英文逗号分隔'")
    private String deptIds;

    @Column(columnDefinition = "varchar(100) COMMENT '昵称,显示的名字'")
    private String nickname;

    @Column(columnDefinition = "varchar(40) COMMENT '用户的性别，值为1时是男性，值为2时是女性，值为0时是未知'")
    private String sex;

    @Column(columnDefinition = "varchar(40) COMMENT '省份'")
    private String province;

    @Column(columnDefinition = "varchar(40) COMMENT '地市'")
    private String city;

    @Column(columnDefinition = "varchar(10) COMMENT '状态，1-正常，2-删除'")
    private String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDeptIds() {
        return deptIds;
    }

    public void setDeptIds(String deptIds) {
        this.deptIds = deptIds;
    }

    /**
     * 当用无头像时，可以自更新头像
     */
    @Column(columnDefinition = "varchar(40) COMMENT '用户头像，若用户更换头像，原有头像URL将失效，更新头像按钮'")
    private String headimgurl;

    @Column(columnDefinition = "varchar(40) COMMENT '最后关注时间'")
    private String subscribeTime;

    /**
     * ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，
     * ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENE_PROFILE_ LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，
     * ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他
     */
    @Column(columnDefinition = "varchar(40) COMMENT '用户关注的渠道来源'")
    private String subscribeScene;

    public String getSubscribeScene() {
        return subscribeScene;
    }

    public void setSubscribeScene(String subscribeScene) {
        this.subscribeScene = subscribeScene;
    }

    public String getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds;
    }

    public String getPermissionIds() {
        return permissionIds;
    }

    public void setPermissionIds(String permissionIds) {
        this.permissionIds = permissionIds;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getHeadimgurl() {
        return headimgurl;
    }

    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }

    public String getSubscribeTime() {
        return subscribeTime;
    }

    public void setSubscribeTime(String subscribeTime) {
        this.subscribeTime = subscribeTime;
    }


}
